//
//  OANoticeDetailsVC.m
//  OA项目
//
//  Created by innofive on 2018/5/30.
//  Copyright © 2018年 inno. All rights reserved.
//

#import "OANoticeDetailsVC.h"
#import "OANoticeListModel.h"
@interface OANoticeDetailsVC ()
@property(nonatomic,strong)UILabel *label;
@property(nonatomic,strong)UILabel *timer;
@property(nonatomic,strong)UILabel *cnenter;
@end

@implementation OANoticeDetailsVC

- (void)viewDidLoad {
    [super viewDidLoad];
 
    
}
-(void)onLoadViewByWillAppear:(UIView *)view
{
    UILabel *label = ({
        UILabel *l = [UILabel new];
        l.textAlignment = NSTextAlignmentCenter;
        l.textColor = [UIColor blackColor];
        l.font = kSysFont(kFitW(15));
        [view addV:l];
        l;
    });
    _label = label;

    
    UIView *lin = ({
        UIView *l = [UIView new];
        l.backgroundColor = hexCOLOR(@"DBDBDB");
        [view addV:l];
        l;
    });
    
    
    UILabel *timer = ({
        UILabel *l = [UILabel new];
        l.textColor = hexCOLOR(@"A3A3A3");
        l.textAlignment = NSTextAlignmentCenter;
        l.backgroundColor = [UIColor whiteColor];
        l.font = kSysFont(kFitW(13));
        [view addV:l];
        l;
    });
    _timer = timer;
    
    UILabel *cnenter = ({
        UILabel *l = [UILabel new];
        l.numberOfLines = 0;
        l.textColor = [UIColor blackColor];
        l.font = kSysFont(kFitW(15));
        [view addV:l];
        l;
    });
    _cnenter = cnenter;
    
    
    [self onMainQueueAddSub:^(UIView *view, CGPoint origin, CGSize size, CGPoint center) {
        [label sizeToFit];
        label.top = kFitH(25);
        label.centerX = size.width/2;
        
        lin.left = kFitW(10);
        lin.top = label.bottom+kFitH(10);
        lin.height = 0.5f;
        lin.width =size.width-kFitW(20);
        
        [timer sizeToFit];
        timer.centerY = lin.centerY;
        timer.centerX = size.width/2;
        
        cnenter.left = kFitW(30);
        cnenter.top =lin.bottom+kFitH(20);
        [cnenter sizeToFit];
        cnenter.width = size.width-kFitW(60);
    }];
    
    
}

-(void)onLoadDataForPageNum:(NSInteger)pageNum
{
    WSELF(weakSelf);
    [OANoticeListModel onPOSTURL:apiNotificationModuleCategory Param:@{@"id":self.model.Id} AClass:[OANoticeListModel class] successBlock:^(OANoticeListModel * data) {
        weakSelf.label.text =data.type;
        
        
    } falieBlock:self.failedBlock errorBlock:self.errorBlock];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
